#ifndef __OLED_H__
#define __OLED_H__

#include "stm32f1xx_hal.h"
#include "codetab.h"	//瀛楀簱鏂囦欢
//#include "oled.c"		//澹版槑
#include "i2c.h"
#include "math.h"

extern uint8_t oled_GPUImage[128][64];

typedef struct{
    uint8_t length;
    uint8_t width;
    uint8_t pic[];
}my_pics;


void oled_cmd(uint8_t cmd);
void oled_data(uint8_t data);
void oled_datas(uint8_t * datas,uint16_t length);
void oled_init(void);
void oled_on(void);
void oled_off(void);
void OLED_Set_Pos(unsigned char x, unsigned char y);
void oled_scroll(void);

void pic_inits(my_pics *pics,uint8_t length,uint8_t width,uint8_t pic_datas[]);

void oled_blit_num(uint8_t x,uint8_t y,float num,uint8_t len);
void oled_blit_str(uint8_t x,uint8_t y,uint8_t *chr);//128*64
void pic_blit(int x,int y,int length,int height,uint8_t* arr);
void oled_clear(void);
void oled_update(void);


#endif
